home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / Getting Started / MPW Development / MPW Additions / INTO Interfaces&Libraries / Cyberdog SDK / PublicIncludes / CyberServiceMenu.xh < prev    next >
Encoding:
Text File  |  1996-08-02  |  5.2 KB  |  219 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: CyberServiceMenu.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. #ifndef SOM_CyberServiceMenu_xh
  11. #define SOM_CyberServiceMenu_xh
  12.  
  13. class CyberServiceMenu;
  14.  
  15. #define CyberServiceMenu_MajorVersion 1
  16. #define CyberServiceMenu_MinorVersion 0
  17.  
  18. /* C++ SOM defs */
  19. #include <somcls.xh>
  20. #include <somcm.xh>
  21.  
  22. /* C++ parent defs */
  23. #ifndef SOM_ODObject_xh
  24. #include <ODObject.xh>
  25. #endif
  26.  
  27. #ifndef CyberServiceMenu_API
  28. #define CyberServiceMenu_API
  29. /*
  30.  * -- The Class API
  31.  */
  32.  
  33. /*
  34.  * Start of user-defined types:
  35.  */
  36. class SOMClass;
  37. class SOMObject;
  38. class ODFrame;
  39. class ODFacet;
  40. class ODObject;
  41. class ODExtension;
  42. class CyberServiceMenu;
  43. class ODMenuBar;
  44. class ODPart;
  45.  
  46. /*
  47.  * End of user-defined types.
  48.  */
  49.  
  50. #ifdef OLDIBMSOMAPISUPPORT
  51. #define CyberServiceMenuCClassData CyberServiceMenuClassData
  52. #define CyberServiceMenuNewClass(major,minor) somNewVersionedClassReference(CyberServiceMenu,major,minor)
  53. #endif
  54.  
  55. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  56. #define CyberServiceMenuMetaClass SOMClass
  57.  
  58.  
  59. /* The API to the CyberServiceMenu class object, and the methods it introduces. */
  60. SOMEXTERN struct CyberServiceMenuClassDataStructure {
  61. #ifdef OLDIBMSOMAPISUPPORT
  62.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  63. #else
  64.     long zero;
  65. #endif
  66.     somStaticClassInfo *sci;
  67.     somDToken        instanceDataToken;
  68.     long reserved [3];
  69.     somMToken ICyberServiceMenu;
  70.     somMToken DoCommand;
  71.     somMToken Adjust;
  72.     somMToken MenuFocusAcquired;
  73.     somMToken MenuFocusLost;
  74. } SOMDLINK CyberServiceMenuClassData;
  75.  
  76. #if !defined(CyberServiceMenu_Class_Source) && !defined(SOM_Module_cyberservicemenu_Source)
  77. #if PRAGMA_IMPORT_SUPPORTED
  78. #pragma import list CyberServiceMenuClassData
  79. #endif
  80. #endif
  81.  
  82.  
  83. /*
  84.  * -- Typedefs and inline method declarations for left path inherited methods
  85.  * -- are omitted because this compilation had -museinheritedmethods in effect
  86.  */
  87.  
  88.  
  89. /*
  90.  * -- Typedefs for CyberServiceMenu Method Procedures
  91.  */
  92. SOMEXTERN {
  93. typedef void   (* SOMLINK somTD_CyberServiceMenu_ICyberServiceMenu)(CyberServiceMenu *somSelf, Environment *ev,
  94.         ODMenuBar* menuBar,
  95.         ODPart* part,
  96.         long baseCommandID);
  97. typedef ODBoolean   (* SOMLINK somTD_CyberServiceMenu_DoCommand)(CyberServiceMenu *somSelf, Environment *ev,
  98.         long commandID,
  99.         ODFrame* frame);
  100. typedef void   (* SOMLINK somTD_CyberServiceMenu_Adjust)(CyberServiceMenu *somSelf, Environment *ev,
  101.         ODFrame* frame);
  102. typedef void   (* SOMLINK somTD_CyberServiceMenu_MenuFocusAcquired)(CyberServiceMenu *somSelf, Environment *ev,
  103.         ODFrame* frame);
  104. typedef void   (* SOMLINK somTD_CyberServiceMenu_MenuFocusLost)(CyberServiceMenu *somSelf, Environment *ev,
  105.         ODFrame* frame);
  106. }
  107.  
  108. #endif /* CyberServiceMenu_API */
  109.  
  110.  
  111. /*
  112.  * -- This emitter treats Method Tokens as Thunks by default.
  113.  * -- Use the sc modifier "nothunks" to change this default
  114.  */
  115. #undef somresolve_
  116. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  117.  
  118. /*
  119.  * -- The C++ Wrapper Class for CyberServiceMenu
  120.  */
  121. class CyberServiceMenu : public ODObject
  122. {
  123. public:
  124.  
  125. // CyberServiceMenu::new registers use of the class object, and then uses somNew
  126. // to allocate memory and load the object method table pointer. 
  127. void *operator new(size_t size)
  128. {
  129.     SOM_IgnoreWarning(size);
  130.     // Allocate memory using the default allocator for CyberServiceMenu, and
  131.     // clear mem & set method table pointer, call basic initialization
  132. #ifdef SOMCHKNULL
  133.     void * __somResult = (void *)
  134.       somNewObject(CyberServiceMenu);
  135.     SOMCHKNULL(__somResult);
  136.     return __somResult;
  137. #else
  138.     return (void*) somNewObject(CyberServiceMenu);
  139. #endif
  140. }
  141.  
  142. // CyberServiceMenu::delete uses the default deallocator for the object's class.
  143. void operator delete(void * obj)
  144. {
  145.     if (obj) {
  146.         SOM_Resolve(obj,SOMObject,somFree)
  147.            ( (SOMObject*) obj );
  148.     }
  149. }
  150.  
  151. /* method: ICyberServiceMenu */
  152. void   ICyberServiceMenu(Environment *ev,
  153.         ODMenuBar* menuBar,
  154.         ODPart* part,
  155.         long baseCommandID)
  156. {
  157.    SOM_ResolveD(this,CyberServiceMenu,CyberServiceMenu,ICyberServiceMenu)
  158.     (this,ev,menuBar,part,baseCommandID);
  159. #ifdef SOMCHKEXCEPT
  160.       SOMCHKEXCEPT;
  161. #endif
  162. }
  163.  
  164. /* method: DoCommand */
  165. ODBoolean   DoCommand(Environment *ev,
  166.         long commandID,
  167.         ODFrame* frame)
  168. {
  169.    #ifdef SOMCHKEXCEPT
  170.    ODBoolean __somResult = 
  171.       SOM_ResolveD(this,CyberServiceMenu,CyberServiceMenu,DoCommand)
  172.     (this,ev,commandID,frame);
  173.       SOMCHKEXCEPT;
  174.    return __somResult;
  175. #else
  176.    return SOM_ResolveD(this,CyberServiceMenu,CyberServiceMenu,DoCommand)
  177.     (this,ev,commandID,frame);
  178. #endif
  179. }
  180.  
  181. /* method: Adjust */
  182. void   Adjust(Environment *ev,
  183.         ODFrame* frame)
  184. {
  185.    SOM_ResolveD(this,CyberServiceMenu,CyberServiceMenu,Adjust)
  186.     (this,ev,frame);
  187. #ifdef SOMCHKEXCEPT
  188.       SOMCHKEXCEPT;
  189. #endif
  190. }
  191.  
  192. /* method: MenuFocusAcquired */
  193. void   MenuFocusAcquired(Environment *ev,
  194.         ODFrame* frame)
  195. {
  196.    SOM_ResolveD(this,CyberServiceMenu,CyberServiceMenu,MenuFocusAcquired)
  197.     (this,ev,frame);
  198. #ifdef SOMCHKEXCEPT
  199.       SOMCHKEXCEPT;
  200. #endif
  201. }
  202.  
  203. /* method: MenuFocusLost */
  204. void   MenuFocusLost(Environment *ev,
  205.         ODFrame* frame)
  206. {
  207.    SOM_ResolveD(this,CyberServiceMenu,CyberServiceMenu,MenuFocusLost)
  208.     (this,ev,frame);
  209. #ifdef SOMCHKEXCEPT
  210.       SOMCHKEXCEPT;
  211. #endif
  212. }
  213.  
  214. };   /* CyberServiceMenu */
  215.  
  216.  
  217.  
  218. #endif       /* SOM_CyberServiceMenu_xh */
  219.